<script type="text/javascript">//<![CDATA[
	XHR.poll(5, '<%=url("admin/nas/qbittorrent_status")%>', null,
		function(x, st)
		{
			var tb = document.getElementById('qbittorrent_status');
			if (st && tb)
			{
				if (st.running)
				{
					tb.innerHTML = '<em style=\"color:green\"><b>qBittorrent <%:RUNNING%></b></em>' + "&nbsp;&nbsp;&nbsp;&nbsp;<input class=\"btn cbi-button cbi-button-apply \" type=\"button\" value=\" <%:Open Web Interface%> \" onclick=\"window.open('http://" + window.location.hostname + ":" + st.port + "/')\"/>";
				}
				else
				{
					tb.innerHTML = '<em style=\"color:red\"><b>qBittorrent <%:NOT RUNNING%></b></em>';
				}
			}
		}
	);
//]]></script>

<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
	<p id="qbittorrent_status">
		<em><b><%:Collecting data...%></b></em>
	</p>
</fieldset>
